<?php

declare(strict_types=1);
/**
 * Web端控制器入口
 */

namespace App\Controller;

use App\Service\H5\ViolationPublicizeService;
use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\JTAuthMiddleware;
use App\Middleware\CorsMiddleware;
use App\Service\H5\GetUserInfoService;
use App\Service\H5\UserFreezeService;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface;
use App\Service\H5\ComplainLabService;
use App\Service\H5\ComplainRecordLogService;
use App\Service\H5\ComplainRecordLogListService;
use App\Service\H5\UpdateImgService;
/**
 * @Controller(prefix="web")
 */
class WebController extends AbstractController
{
    /**
     * 获取用户信息
     * @RequestMapping(path="user/info", methods="post")
     * 
     * @Middleware(CorsMiddleware::class)
     */
    public function user_info(GetUserInfoService $service)
    {
        return $service->response();
    }

    /**
     * 封禁用户
     * @RequestMapping(path="user/freeze", methods="post")
     * 
     * @Middleware(CorsMiddleware::class)
     */
    public function user_freeze(UserFreezeService $service)
    {
        return $service->response();
    }

    /**
     * 投诉标签
     * @RequestMapping(path="complaint/lab", methods="get")
     *
     * @Middleware(CorsMiddleware::class)
     */
    public function complaint_lab(ComplainLabService $service)
    {
        return $service->response();
    }

    /**
     * 添加投诉
     * @RequestMapping(path="complaint/add-record", methods="post")
     *
     * @Middleware(CorsMiddleware::class)
     */
    public function add_complaint_record(ComplainRecordLogService $service)
    {
        return $service->response();
    }

    /**
     * 投诉列表
     * @RequestMapping(path="complaint/list", methods="get")
     *
     * @Middleware(CorsMiddleware::class)
     */
    public function get_complaint_record(ComplainRecordLogListService $service)
    {
        return $service->response();
    }
    /**
     * 投诉列表
     * @RequestMapping(path="complaint/updateImg", methods="post")
     *
     * @Middleware(CorsMiddleware::class)
     */
    public function updateImg(UpdateImgService $service)
    {
        return $service->response();
    }

    /**
     * 违规名单公示
     * @RequestMapping(path="violation/publicize", methods="get")
     *
     * @Middleware(CorsMiddleware::class)
     */
    public function violationPublicize(ViolationPublicizeService $service)
    {
        return $service->response();
    }
}
